package edu.uwm.capstone.android.util;

import edu.uwm.capstone.diasmart.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;

public class DialogUtil {
	public static AlertDialog.Builder createErrorDialog(Activity paramActivity,
			int paramInt1, int paramInt2) {
		return createErrorDialog(paramActivity, paramInt1,
				paramActivity.getString(paramInt2));
	}

	public static AlertDialog.Builder createErrorDialog(Activity paramActivity,
			int paramInt, String paramString) {
		return new AlertDialog.Builder(paramActivity)
				.setIcon(android.R.drawable.ic_dialog_alert)
				.setMessage(paramString)
				.setTitle(R.string.error)
				.setPositiveButton(R.string.ok,
						new DialogInterface.OnClickListener() {
							public void onClick(
									DialogInterface paramAnonymousDialogInterface,
									int paramAnonymousInt) {
							}
						});
	}

	public static AlertDialog.Builder createInfoDialog(Activity paramActivity,
			int paramInt1, int paramInt2) {
		return createInfoDialog(paramActivity, paramInt1,
				paramActivity.getString(paramInt2));
	}

	public static AlertDialog.Builder createInfoDialog(Activity paramActivity,
			int paramInt, String paramString) {
		return new AlertDialog.Builder(paramActivity)
				.setIcon(android.R.drawable.ic_dialog_info)
				.setMessage(paramString)
				.setTitle(paramInt)
				.setPositiveButton(R.string.ok,
						new DialogInterface.OnClickListener() {
							public void onClick(
									DialogInterface paramAnonymousDialogInterface,
									int paramAnonymousInt) {
							}
						});
	}
}